<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="path" value="${pageContext.request.contextPath }"></c:set>
<c:set var="webPath" value="${request.getContextPath() }"></c:set>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>主机编辑</title>
    <link href="${path }/css/style.css" rel="stylesheet" type="text/css">
    <link href="css/host_addHost.css" rel="stylesheet" type="text/css">
    <link href="${path }/common/plugins/bootstrap/css/bootstrap.css" rel="stylesheet" type="text/css">
    <script src="${path }/js/jquery-1.7.2.min.js" type="text/javascript"></script>
    <script src="${path }/js/user_js.js"></script>
    <script src="${path }/common/plugins/bootstrap/js/bootstrap.js"></script>
    <script src="${path }/common/plugins/layer/layer.js"></script>
</head>
<body>
<input id="webPath" type="hidden" value="${path }"/>
<input id="hostid" value="${vo.hostid }" type="hidden" />
<input id="interfaceid" value="${vo.interfaceid }" type="hidden"/>
<input id="webPath" type="hidden" value="${path }"/>
<div class="content_condition oneContent">
    <div class="content_group">
        <div class="span4">
            <label class="control-label">主机IP:</label>
            <div class="controls">
                <input type="text" name="host" value="${vo.host }"/>
                <span class="redbtn">*</span>
            </div>
        </div>
    </div>
    <div class="content_group">
        <div class="span4">
            <label class="control-label">主机别名:</label>
            <div class="controls">
                <input type="text" name="name" value="${vo.name }"/>
            </div>
        </div>
    </div>
    <div class="content_group">
        <div class="span4">
            <label class="control-label">代理主机ID:</label>
            <div class="controls">
                <input type="text" name="proxy_hostid" value="${vo.proxy_hostid }"/>
            </div>
        </div>
    </div>
    <div class="content_group">
        <div class="span4">
            <label class="control-label">主机所属群组:</label>
            <div class="controls">
            	<select id="groupids" multiple="multiple" size="10" style="float: left">
            		<c:forEach var="selectedgroup" items="${vo.selectedGroup }">
            			<option selected="selected" value="${selectedgroup.groupid }">${selectedgroup.name }</option>
            		</c:forEach>
            	</select>
            	<div style="width: 60px;float: left;text-align:center;margin-top:50px;">
	     			<input type="button" id="add" value="<<添加" >
	     			<input type="button" id="remove" value=">>移除" >
            	</div>
            	<select id="groupNameList" multiple="multiple" size="10" style="float: left">
            		<c:forEach var="hostgroup" items="${hostgroups }">
            			<option value="${hostgroup.groupid }">${hostgroup.name }</option>
            		</c:forEach>
            	</select>
            </div>
        </div>
    </div>
    <div class="content_group">
        <div class="span4">
            <label class="control-label">代理程序接口:</label>
            <div class="controls">
            	<select id="hostInterface" name="type">
            		<option value="1">agent代理程序</option>
            		<option value="2" selected="selected">SNMP接口</option>
            		<option value="3">JMX接口</option>
            		<option value="4">IPMI接口</option>
            	</select>
            </div>
			<div class="controls" style="margin-left:113px;">
                IP地址：<input type="text" name="ip" value="${vo.ip }"/><br/>
                DNS名称：<input type="text" name="dns" value="${vo.dns }" /><br/>
				连接到：<input type="radio" name="useip" value="1" checked="checked">IP地址
					  <input type="radio" name="useip" value="0"/>DNS<br/>
				端口号：<input type="text" name="port" value="${vo.port }">
            </div>
        </div>
    </div>
    <div class="content_group">
        <div class="span5">
            <label class="control-label">是否监控:</label>
            <div class="controls">
                <span class="radio_box"><input type="radio" value="0" name="status"
                	<c:if test="${vo.status == 0 }">
                		checked='checked'
                	</c:if>
                >是</span>
                <span class="radio_box"><input type="radio" value="1" name="status"
                	<c:if test="${vo.status == 1 }">
                		checked='checked'
                	</c:if>
                >否</span>
            </div>
        </div>
    </div>
</div>
<div class="btn_bottom">
    <div class="spanbtn">
        <button class="press_btn1"><i class="save top_current"></i>保存</button>
        <button class="press_btn2 Close"><i class="del top_current"></i>关闭</button>
    </div>
</div>

</body>
<script src="js/host_editHost.js"></script>
</html>